#!/usr/bin/bash

version="1.10.0"

echo "Now we are going to install the onnx, please input the version :"
echo "Such as 1.10.0 (default)"
read input_version

if [[ -n input_version ]]; then
	version=$input_version
fi

if [[ -e onnxruntime-linux-x64-$version.tgz ]]; then
	echo "Archive File Exists !"
else
	wget "https://github.com/microsoft/onnxruntime/releases/download/v$version/onnxruntime-linux-x64-$version.tgz"
fi

tar xf onnxruntime-linux-x64-$version.tgz
sudo cp -r onnxruntime-linux-x64-$version/include /usr/local/include/onnxruntime
sudo cp -r onnxruntime-linux-x64-$version/lib /usr/local
